package com.firmail.exception;


import com.firmail.exception.type.ExceptionType;
import lombok.Setter;

@Setter
public class FieldValidationException extends RuntimeException{

    private Integer code;

    public FieldValidationException(Throwable ex){
        super(ex);
    }

    public FieldValidationException(Integer code , String message){
        super(message);
        this.code=code;
    }

    public FieldValidationException(ExceptionType exType){
        super(exType.getMessage());
        this.code= exType.getCode();
    }

}
